<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>视频下面的按钮</title>
    <!-- <link rel="stylesheet" type="text/css" href="./../../css/video.css" /> -->
    <style>
    body,html{
    height: 0px;
    }
    .center {
      background-color: rgba(129, 129, 128, 0.7);
      text-align: center;
      border-radius: 20px;
      font-size: 15px;
      color: #fff;
      /* position: fixed; */
      /* bottom: 50%; */
      right: 50%;
      margin-top: -8px;
      /* margin-left: -7px; */
      display: inline-block;
      padding: 3px 0px;
          width: 100%;
  }
    .img_wjt {
        width: 10px;
        display: inline-block;
    }

    .img_pro {
        position: absolute;
        bottom: 27px;
        padding: 0px 15px;
        height: 10px;
        width: 100%;
    }

    </style>
</head>

<body>
    <div id="vm">
      <div class="center" @click="liuliang()">
          <img src="./../../image/VIP/wjt.png" alt="" class="img_wjt">
          耗费<span style="color:#FFBA14;font-size:17px;" v-html="videosize"></span>M流量
      </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/config.js"></script>
<script type="text/javascript" src="../../script/rest.js"></script>
<script type="text/javascript" src="../../script/vue.2.5.js"></script>
<script type="text/javascript" src="../../script/zepto.js"></script>
<script type="text/javascript" src="../../script/faskclick.js"></script>
<script type="text/javascript">
    var startX = startY = endX =endY =0;
    var vm = new Vue({
        el: '#vm',
        data: {
          videosize:''
        },
        created: function() {
            var _this = this;
            apiready = function() {
                _this.init();
                api.parseTapmode();
                if ('addEventListener' in document) {
                    document.addEventListener('DOMContentLoaded', function() {
                        FastClick.attach(document.body);
                    }, false);
                }

                _this.videosize = parseInt(api.pageParam.size/1000000);
                api.addEventListener({
                    name: 'bofang'
                }, function(ret, err){
                    if (ret) {
                      api.sendEvent({
                          name: 'liuliangname'
                      });
                      api.closeFrame();
                    }
                });

            }
        },
        methods: {
            init: function() {
              api.addEventListener({
                  name: 'bofang'
              }, function(ret, err){
                api.closeFrame();
              });

            },
            liuliang:function() {
              api.sendEvent({
                  name: 'replay'
              });
              api.sendEvent({
                  name: 'liuliangname'
              });
              api.closeFrame();
            }
        }
    })
</script>

</html>
